<?php
    use admin\assets\AppAsset;
    use yii\widgets\ActiveForm;
    use common\models\CompanySearch;
    AppAsset::addJs($this,'/static/js/admin/admin_edit.js');
?>

<style>
    body{overflow-y: scroll;}
</style>

<div class="container">
    <blockquote class="layui-elem-quote">
        管理员列表 - 编辑管理员
    </blockquote>

    <?php $form = ActiveForm::begin([
            'options'=>['class' => 'layui-form','style'=>'padding-top:20px;'],
           
        
    ]); ?>

        <div class="layui-form-item">
            <label class="layui-form-label">*管理员姓名</label>
            <div class="layui-input-block">
                <input type="hidden" name="id" value="<?php echo $admin['id']; ?>">
                <input type="text" name="name" lay-verify="required" value="<?php echo $admin['name']; ?>" placeholder="请输入管理员姓名" autocomplete="off" class="layui-input">
            </div>
        </div>
        <div class="layui-form-item">
            <label class="layui-form-label">密码设置</label>
            <div class="layui-input-block">
                <input type="text" name="password" placeholder="********" autocomplete="off" class="layui-input">
            </div>
        </div>
        <div class="layui-form-item">
            <label class="layui-form-label">*公司权限</label>
            <div class="layui-input-block">
           
                <?= $form->field($admin, 'company_id')->dropDownList(CompanySearch::getAllCompany(),['class' => 'formSelect','style'=>'display:none;']) ->label(false) ?>
            </div>
        </div>
        <div class="layui-form-item">
            <label class="layui-form-label">手机号码</label>
            <div class="layui-input-block">
                <input type="text" name="phone" value="<?php echo $admin['phone']; ?>" placeholder="请输入手机号码" autocomplete="off" class="layui-input">
            </div>
        </div>
        <div class="layui-form-item">
            <label class="layui-form-label">是否启用</label>
            <div class="layui-input-block">
                <input type="radio" name="native" value="1" title="是" <?php if($admin['status']==1){echo 'checked';} ?>>
                <input type="radio" name="native" value="0" title="否" <?php if($admin['status']==0){echo 'checked';} ?>>
            </div>
        </div>
        <div class="layui-form-item">
            <div class="layui-input-block">
                <button type="button" class="layui-btn" lay-submit="" lay-filter="admin_submit">立即提交</button>
                <button type="reset" class="layui-btn layui-btn-primary">重置</button>
            </div>
        </div>
    <?php ActiveForm::end(); ?>

</div>


